package com.syxd.controller;

import com.syxd.common.annotation.LogOperation;
import com.syxd.common.constant.Constant;
import com.syxd.common.entity.WebResult;
import com.syxd.dto.SysRolePermissionDTO;
import com.syxd.dto.SysSettingDto;
import com.syxd.service.SysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("sys/config")
@Api(tags="设置修改限制")
public class SysConfigController {
@Autowired
SysConfigService sysConfigService;
    @PutMapping("setData")
    @ApiOperation("修改")
    @LogOperation(apiType = "syssetting", apiPath = "sys/setting")
/*    @ApiImplicitParams({
            @ApiImplicitParam(name = "settingDate",value = "设置限制更改时间单位(天)", paramType = "put", required = true, dataType="int") ,
    })*/
    @RequiresPermissions("approval:")
    public WebResult update( @RequestBody SysSettingDto sysSettingDto, HttpServletRequest request) {
        //效验数据
     return    sysConfigService.update(sysSettingDto,request);


    }



}
